<template>
    <el-dialog v-model="dialogVisible" 
    :close-on-click-modal="false" 
    center 
    width="200px" 
    custom-class="my-dialog"
    :show-close="false">
        <div style="width: 150px;margin:auto;text-align:center">
            <el-progress type="dashboard" :percentage="progressNum"></el-progress>
            <p style="padding: 5px 0px;">{{title}}</p>
        </div>
    </el-dialog>
</template>

<script setup lang="ts">
    import {defineProps,computed} from "vue";

    let props = defineProps({
        progressNum: {
            type: Number,
            required: true,
            default: () => 0
        },
        title: {
            type: String,
            default: () => "正在上传"
        }
    })

    let dialogVisible = computed(() => props.progressNum > 0 && props.progressNum < 100);
</script>

<style>
</style>